/*
 * @Author: 詹真琦(legendryztachi@gmail.com)
 * @Date: 2021-11-03 10:27:19
 * @LastEditors: 詹真琦(legendryztachi@gmail.com)
 * @LastEditTime: 2022-04-14 16:13:08
 * @FilePath: \code\cwp-front\pc-collaboration\src\handles\handle-list\modules\create\pre-submit.js
 * @Description:
 */
async function preSubmit(item, resolve) {
    var fnx = _getZWIframe();
    fnx.contentAPI.preSubmit({
        checkNull: false,
        needCheckRule: false,
        needCheckCustom: true,
        failed: null,
        success:  (_contentObj, snMsg)=> {
            if (resolve) {
                resolve(_contentObj, snMsg);
            }
        },
    });
}

export default (item) =>
    new Promise(async (resolve) => {
        await preSubmit(item, resolve);
    });
